<?php

namespace app\common\model;

use think\model\concern\SoftDelete;

class RobotProducts extends \think\Model
{
    use SoftDelete;

    protected $table = 'db_robot_products';

    protected $jsonAssoc = true;

    protected $autoWriteTimestamp = true;

    protected $schema = [
        'id' => 'int',
        'create_time' => 'int',
        'update_time' => 'int',
        'delete_time' => 'int',
        'pubid' => 'varchar',
        'name' => 'varchar',
        'word_limit' => 'int',
        'daily_conversation_limit' => 'int',
        'is_open_api' => 'tinyint',
        'is_remove_brand' => 'tinyint',
        'duration_days' => 'int',
        'price' => 'double',
        'sort' => 'int',
        'describe' => 'varchar',
        'functional_content' => 'longtext',
        'is_open' => 'tinyint',
    ];

    public $getters = [
        
    ];

    /**
     * 关联模型robot
     */
    public function robot()
    {
        return $this->hasMany(Robot::class );
    }
}
